public class Product {
    private String name;
    private int quantity;
    private double price;

    public Product(String initialName,int initialQuantity, double InitialPrice){

        name = initialName;
        quantity = initialQuantity;
        price = InitialPrice;
    }

    public String getName(){

        return name;
    }

    public int getQuantity() {

        return quantity;
    }

    public double getPrice() {

        return price;
    }

    public String toString() {
        return "产品名称：" + name + "\n数量：" + quantity + "\n价格：" + price + "元";
    }

    public static void main(String[] args) {
        Product p = new Product("book", 100, 100.9);
        System.out.println(p);
    }
}
